﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CCPnuts.ISkyDiskFileSystem.Interfaces;
using CCPnuts.Pack;

namespace CCPnuts.ISkyDiskFileSystem
{
    public class Downloader : Transmitor
    {
        #region Packed Target

        internal Downloader(IPacked packed) : base(packed) { }

        internal new I_Downloader Packed { get { return (I_Downloader)base.Packed; } }

        #endregion

        #region Proxy Members

        #region Essential Members

        /// <summary>
        /// Gets or sets the target directory of this download.
        /// </summary>
        public string TagetPath
        {
            get { return Packed.TargetPath; }
            set { Packed.TargetPath = value; }
        }

        /// <summary>
        /// Gets the target of the transmission
        /// </summary>
        public SkyElement Target
        {
            get { return (SkyElement)Util.NNTar(Packed.Target); }
        }

        #endregion

        #endregion

        #region Own Members

        public override TransmissionTypes TransmissionType
        {
            get { return TransmissionTypes.Download; }
        }

        #endregion
    }

    public static partial class PackedInfos
    {
        public static PackedInfo Downloader { get { return new PackedInfo(p => new Downloader(p)); } }
    }
}
